import React, {useState} from 'react';
import {Button, Dialog} from "react-ui-xmui";

const DialogDemo2 = () => {
  const [visible2, setVisible2] = useState(false)
  return (
    <div>
      <Button buttonType={'primary'} onClick={() => setVisible2(!visible2)}>toggle</Button>
      <Dialog visible={visible2} button={[
        <Button onClick={() => {
          setVisible2(false)
        }}>取消</Button>,
        <Button onClick={() => {
          setVisible2(false)
        }}>关闭</Button>
      ]} onClose={() => {
        setVisible2(false)
      }} isCloseModelClose={true}>hi</Dialog>
    </div>
  );
};

export default DialogDemo2;